<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id='hello'>
        <label for="agree">
            <!-- checkbox的checked属性代表选中或者没选中的状态 
                value属性代表对表单提交的值
                一、v-model对应的data属性是数组时，对应的是checkbox的value值
                二、v-model对应的data属性是Boolean时，对应的是checkbox的checked的值
            -->
            <input type="checkbox" id="agree" v-model="isAgree">同意协议
        </label>
        <button :disabled='!isAgree'>下一步</button>


        <!-- 演示多选框提交 -->
        <input type="checkbox" value="篮球" v-model="hobbies">篮球
        <input type="checkbox" value="唱" v-model="hobbies">唱
        <input type="checkbox" value="跳" v-model="hobbies">跳
        <input type="checkbox" value="rap" v-model="hobbies">rap
        {{hobbies}}

    </div>
    <script src="../vue.js"></script>
    <script>
        const vueApp = new Vue({
            el: '#hello',
            data: {
                isAgree: false,
                hobbies:[],
            },
        })
    </script>
</body>

</html>